Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 - calculator salary data input for Sanity Studio #535

Merged
merged 21 commits into from
Sep 10, 2024

Conversation

mathiazom
Copy link
Contributor

@mathiazom mathiazom commented Aug 28, 2024

Further explanation is found here: #523

Added salaries data to the compensations document schema. Each year has a JSON-encoded object of examinationYear and salary pairs (see picture below).

The Studio input for a year's salaries consists of an upload button for loading data from a .csv file. Once loaded, the individual salaries can be edited via number inputs.

Salary data from Studio is not yet connected to the salary calculator.


Visual Overview (Image/Video)

List of per-year salary data:

image

Editable salaries after .csv upload

image

Internally stored as JSON objects, as seen from Studio Vision:

image

User feedback for common error states is provided as toasts, for example invalid data:

image

Checklist

Please ensure that you’ve completed the following checkpoints before submitting your pull request:

  • Documentation: Relevant documentation has been added or updated (if applicable).
  • Testing: Have you tested your changes thoroughly?

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 8:07am
variant-se-2 ✅ Ready (Inspect) Visit Preview Sep 10, 2024 8:07am

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalaryNumberInput.tsx Outdated Show resolved Hide resolved
studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
@mathiazom mathiazom force-pushed the feat/v3-dynamic-salary-data-for-calculator branch from d56572f to 948e1cb Compare August 28, 2024 12:38
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
@mathiazom mathiazom force-pushed the feat/v3-dynamic-salary-data-for-calculator branch from cd95c7d to ce467ca Compare September 3, 2024 08:34
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

studio/components/SalaryCsvInput/SalariesInput.tsx Outdated Show resolved Hide resolved
since there is no way to specify a fixed ordering (only custom user order)
This allows us to still provide the filename to screen readers after file upload. The file will now be cleared when the user starts to upload a new file (note that the file will also be cleared if the user only cancels the file dialog without uploading a file).
To clarify that a file has already been uploaded, and a new upload will override these values
@mathiazom mathiazom force-pushed the feat/v3-dynamic-salary-data-for-calculator branch from 87243e2 to 88fda1b Compare September 10, 2024 07:58
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

@mathiazom mathiazom merged commit bd1df00 into v3 Sep 10, 2024
6 checks passed
@mathiazom mathiazom deleted the feat/v3-dynamic-salary-data-for-calculator branch September 10, 2024 08:09
@mathiazom mathiazom mentioned this pull request Oct 9, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants